<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  created() {
    this.initTheme();
  },
  methods: {
    initTheme() {
      function setAttribute(theme) {
        window.document.documentElement.setAttribute('data-theme', theme);
      }
      let isWin = /windows/i.test(navigator.userAgent);
      let isIpad = /iPad/i.test(navigator.userAgent);
      if (isWin) {
        setAttribute('pc'); // pc端应用主题2
      } else if (isIpad) {
        setAttribute('ipad'); // 应用主题3
      }
    },
  },
};
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: left;
  color: #2c3e50;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f1f3f9;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}

.rview {
  padding: 20px 50px;
}
// 字体大小
.Ptitle {
  font-size: 18px;
  font-weight: bold;
  margin: 0px 0px;
  padding-bottom: 10px;
  margin-top: -10px;
}
// 背景色模块，白色
.white{
  background-color: #fff;
}
// 内边距
.ptop{
  padding-top: 20px;
}
.xian{
  width: 98%;
  height: 1px;
  margin: 0 auto;
  background-color: #F0F0F0;
}
// 按钮样式
.btnBody{
  text-align: right;
  padding-right: 20px;
  padding-bottom: 20px;
  padding-top: 20px;
}
// 表格样式
.tableBod{
  margin-top: 20px;
  padding: 20px 20px;
  // height: 500px;
  border-radius: 4px;
}
</style>
